<?php 
class CBaseTestimonials extends CBaseEosPlural {

	public function __construct() {		
		return true;
	}
	
	public static function fetchTestimonials( $objDatabase ) {
		$strSql = 'SELECT * FROM `testimonials`';
		return parent::fetchResults( $strSql, 'CTestimonial', $objDatabase );
	}
	
	public static function fetchTestimonialById( $intId, $objDatabase ) {
		$strSql = 'SELECT 
						t.*, u.login_name 
					FROM 
						`testimonials` AS t LEFT JOIN `users` as u 
							ON t.created_by=u.id
					WHERE 
						t.`id` = ' . $intId;
		return parent::fetchResult( $strSql, 'CTestimonial', $objDatabase );
	}
		
}
?>